home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 11 / Cream of the Crop 11-2.iso / extra / disp186b.zip / VDRHEAD.ASM < prev    next >
Assembly Source File  |  1993-12-06  |  4KB  |  102 lines

  1. ;--------------------------------------------------------------------------
  2. ; This is file VDRHEAD.ASM
  3. ;
  4. ; Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954
  5. ; Copyright (C) 1992 Csaba Biegl, 820 Stirrup Dr, Nashville, TN 37221
  6. ; Copyright (C) 1993 Grzegorz Mazur, gbm@ii.pw.edu.pl
  7. ;
  8. ; This file is distributed under the terms listed in the document
  9. ; "copying.dj", available from DJ Delorie at the address above.
  10. ; A copy of "copying.dj" should accompany this file; if not, a copy
  11. ; should be available from where this file was obtained.  This file
  12. ; may not be distributed without a verbatim copy of "copying.dj".
  13. ;
  14. ; This file is distributed WITHOUT ANY WARRANTY; without even the implied
  15. ; warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  16. ;--------------------------------------------------------------------------
  17.  
  18. ;
  19. ; Modified version of the standard small model Turbo C assembly
  20. ; output segment directives. Forces everything into a single segment
  21. ;
  22. _TEXT    segment byte public 'CODE'
  23. _TEXT    ends
  24. DGROUP  group    _TEXT,_DATA,_BSS            ;; added _TEXT
  25.     assume  cs:_TEXT,ds:DGROUP
  26. _DATA    segment word public 'DATA'
  27. d@    label    byte
  28. d@w    label    word
  29. _DATA    ends
  30. _BSS    segment word public 'BSS'
  31. b@    label    byte
  32. b@w    label    word
  33. _BSS    ends
  34. _TEXT    segment byte public 'CODE'
  35.     assume  cs:_TEXT,ds:DGROUP
  36.  
  37. include grdriver.inc
  38.  
  39. ;--------------------------------------------------------------------------
  40. ; DRIVER HEADER
  41. ;  The following entries MUST match the structure and constant
  42. ;  declarations in the file 'grdriver.h' of the GRX graphics library
  43. ;  The mode word should contain the following bitfields:
  44. ;     - the GRD_NEW_DRIVER bit set for any new format driver
  45. ;     - the adapter type field should be specified
  46. ;     - the memory size field should be specified
  47. ;     - the paging mode field should be specified
  48. ;  The mode set routine will OR in the plane bitfield as it will
  49. ;  change when different color number modes are requested.
  50. ;--------------------------------------------------------------------------
  51.  
  52. _driver_header:
  53.     ;; ".GRD" fields:
  54.     dw    offset _mode_set_routine    ; text/graphics mode set routine
  55.     dw    offset _paging_routine        ; video memory paging routine
  56.     dw    GRD_NEW_DRIVER            ; driver flags (init func sets other bits)
  57.     dw    80                ; default text width
  58.     dw    25                ; default text height
  59.     dw    640                ; default graphics width
  60.     dw    480                ; default graphics height
  61.     ;; ".GRN" fields:
  62.     dw    16                ; default graphics colors
  63.     dw    offset _driver_init_routine    ; driver init func
  64.     dw    offset _text_mode_table        ; ptr to supported text modes
  65.     dw    offset _graphics_mode_table    ; ptr to supported graphics modes
  66.     dw    0                ; pageflip fn (obsolete)
  67.     ;; ".VDR" fields (hard-coded):
  68.     db    '.VDR driver',0            ; VDR format 'magic' string
  69.     dw    offset _driver_name        ; pointer to driver name
  70.     dw    offset _set_screen_start    ; scroll/pageflip routine
  71.     ;; fields configured once by GO32 after driver is loaded
  72.     dw    0                ; flags for real-mode paing, fast 256 mode, etc..
  73.     ;; fields filled out by the driver init routine
  74.     dw    0                ; video adapter memory size in 4 kByte units
  75.     ;; fields read/written by both the driver and GO32 during every mode set
  76.     dw    0,0                ; requested/actual virtual resolution
  77.     dd    0                ; real/prot mode VESA paging function
  78.     ;; fields configured by the driver after every mode set
  79.     dw    0                ; line offset in this graphics mode
  80.     dw    0a000h,0            ; start paragraph of the write and read pages
  81.     db    4                ; log2 of page size/4kB
  82.     db    0                ; log2 of page size/granularity
  83.     db    0,0, 0,0, 0,0, 0,0        ; pixel format descriptors (r, g, b, fill)
  84.     ;; fields for future memory mapping and paging extensions
  85.     dd    0                ; extended memory (linear) address
  86.     dw    0                ; map this many 4 kByte pages at above addr
  87.     dw    0                ; 32-bit callable paging function
  88.  
  89.     extrn    _mode_set_routine:near
  90.     extrn    _paging_routine:near
  91.     extrn    _driver_init_routine:near
  92.     extrn    _text_mode_table:near
  93.     extrn    _graphics_mode_table:near
  94.     extrn    _set_screen_start:near
  95.     extrn    _driver_name:near
  96.  
  97.     public  _driver_header            ; for C code to access header info
  98.  
  99. _TEXT    ends
  100.     end
  101.  
  102.